/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package erp_garagenbetrieb;

import java.beans.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;

/**
 *
 * @author Fabian Rauber
 */
public class DB_Connect
{

    
    public DB_Connect()
    {




        try
        {

            Class.forName("org.postgresql.Driver"); //Buch s. 345

            Connection con = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/ERP_Garagenbetrieb", "postgres", "root");

            //Statement stmt = (Statement) con.createStatement();

            //ResultSet rs = stmt.executeQuery("SELECT * from tUser");


//            while (rs.next())
//            {
//                System.out.println(rs.getString("usrName") + " " + rs.getString("usrPassword"));
//                System.out.println(rs.getDate("usrCrDt") + " " + rs.getTime("usrCrDt"));
//            }
        } catch (Exception e)
        {
            System.out.println(e);
        }

    }
}
